package hips.gui;
import javax.swing.GroupLayout.Alignment;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class NoMemoryFrame extends javax.swing.JFrame {
	private static final long serialVersionUID = 1L;

	public NoMemoryFrame() {
        initComponents();
        ComponentLocation.setLocationCenter(0.25f, 0.5f, this);
    }

    private void initComponents() {
    	setBounds(0, 0, 636, 171);
        jLabel4 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setIconImages(null);
        setResizable(false);

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 18));
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("There is not enough memory. Close some images and try again.");
        
        JButton btnOk = new JButton("OK");
        btnOk.addActionListener(new ActionListener() {
        	public void actionPerformed(ActionEvent arg0) {
        		dispose();
        	}
        });
        btnOk.setFont(new Font("Calibri", Font.PLAIN, 16));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        layout.setHorizontalGroup(
        	layout.createParallelGroup(Alignment.TRAILING)
        		.addComponent(jLabel4, GroupLayout.PREFERRED_SIZE, 440, Short.MAX_VALUE)
        		.addGroup(layout.createSequentialGroup()
        			.addContainerGap(257, Short.MAX_VALUE)
        			.addComponent(btnOk, GroupLayout.PREFERRED_SIZE, 123, GroupLayout.PREFERRED_SIZE)
        			.addGap(250))
        );
        layout.setVerticalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addComponent(jLabel4, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE)
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addComponent(btnOk, GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE)
        			.addContainerGap())
        );
        getContentPane().setLayout(layout);
    }
    private javax.swing.JLabel jLabel4;
}